package com.atguigu.algorithm;

import java.util.Scanner;

public class RecevierList {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNextInt()){
            int n= scanner.nextInt();
            String[] strings=new String[n];
                strings[0]= scanner.nextLine();
            for(int i=0;i<n;i++){
                strings[i]=scanner.nextLine();
            }
            for(int i=0;i<n;i++){
                String s=strings[i];
                if(s.contains(" ") || s.contains(",")){
                    StringBuilder sb=new StringBuilder();
                    sb.append('"');
                    sb.append(s);
                    sb.append('"');
                    strings[i]=sb.toString();
                }
            }
            StringBuilder sb=new StringBuilder();
            for(int i=0;i<n;i++){
                sb.append(strings[i]);
                if(i!=n-1) {
                    sb.append(", ");
                }
            }
            System.out.println(sb.toString());
        }
    }
}
